| Conditions | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import { setBlockType } from 'prosemirror-commands'; |
||
| 11 | static getMenuItem({ nodes }) { |
||
| 12 | if (!this.isAvailable({ nodes })) { |
||
| 13 | throw new Error('Plugin block not available in schema!'); |
||
| 14 | } |
||
| 15 | return new MenuItem({ |
||
| 16 | command: setBlockType(nodes.dwplugin_block), |
||
| 17 | icon: svgIcon('puzzle'), |
||
| 18 | label: LANG.plugins.prosemirror['label:pluginBlock'], |
||
|
|
|||
| 19 | }); |
||
| 20 | } |
||
| 21 | } |
||
| 22 |
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.